<template>
    <van-swipe :autoplay="3000">
        <van-swipe-item v-for="image in images" :key="image.id">
            <img v-lazy="image.imgUrl" />
        </van-swipe-item>
    </van-swipe>
</template>
<script>
/* 导入封装的http类 */
import HomeHttp from '@/utils/axios/HomeHttp';
export default {
    name: 'SwipeImg',
    data() {
        return {
            images: [],
        }
    },
    async mounted() {
        let res = await HomeHttp.getBanner();
        this.images= res.data.res
    },
}
</script>

<style>
img {
    height: 239px;
    width: 100%;
}
</style>